import React from "react";
import PropTypes from 'prop-types';

import './index.css';

const User = ({
    userInfo,
    bindClick
}) => {
    return (
        <li className="list" onClick={bindClick}> 
            <p> { userInfo.name } </p>    
            <p> { userInfo.age } </p>    
            <p> { userInfo.organization } </p>
            <p> { userInfo.status } </p>
            <p> { userInfo.goods } </p>

        </li>
    )
}

User.prototype = {
    name: PropTypes.string.required,
    age: PropTypes.number.required,
    bindClick: PropTypes.func.required
}


export default User;